home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Drivin' Route 66
/
Drivin' Route 66 (1995)(Creative Multimedia)[Mac-PC].iso
/
pc
/
rtmm.dir
/
00384_Script_UTILS
< prev
next >
Wrap
Text File
|
1995-10-03
|
14KB
|
505 lines
-- things that should always be done
on generalsetup
global filerPath
hideStateFrames
if length(filerPath) = 0 then
clearItinerary
end if
lowLevInit
noSprites
end
on noSprites
repeat with p = 1 to 48
puppetSprite p,0
end repeat
updateStage
end
on doPicon thePic
-- alert string(thePic)
if thePic = 1 then
goCars
else if thePic = 2 then
goStories
else
goCruiseControl
end if
end
on goCruiseControl
global ccFYI,jumpMode
put "cc" into jumpmode
put the frame into ccFYI
noSprites
go frame "fader2"
go movie "RTCC.dir"
--put "cc" into jumpmode
--noSprites
--fixPicons
--puppetTransition 0
--updateStage
--unloadcast
--go frame "fader"
--go frame "fader2"
--go frame ccFYI
end
on goStories
global stFYI,jumpMode
put "st" into jumpmode
put the frame into stFYI
noSprites
go frame "fader2"
go movie "RTSM.DIR"
--put "st" into jumpmode
--noSprites
--puppetTransition 0
--updateStage
--go frame "fader"
--go frame "fader2"
--puppetTransition 0
--updatestage
--fixPicons
--go frame stFYI
end
on goCars
global carFYI,jumpMode
put "cr" into jumpmode
put the frame into carFYI
noSprites
go frame "fader2"
go movie "RTCM.DIR"
--put "cr" into jumpmode
--noSprites
--fixPicons
--puppetTransition 0
--updateStage
--go frame "fader"
--go frame "fader2"
--go frame carFYI
end
on fixMapPicons
repeat with s = 35 to 37
-- puppetSprite s,0
set the visible of sprite s to true
end repeat
updateStage
end
on goMainMap
fixMapPicons
prepMaps
dodelay
go frame "US MAP"
end
on prepMaps
repeat with s = 14 to 17
puppetSprite s,0
set the visible of sprite s to false
end repeat
updateStage
end
on prepSites
repeat with s = 14 to 17
puppetSprite s,0
set the visible of sprite s to false
end repeat
updateStage
set the visible of sprite 14 to true
set the visible of sprite 15 to true
updateStage
end
on hideStateFrames
repeat with s = 35 to 37
set the visible of sprite s to true
end repeat
preLoadCast 392,399
repeat with p = 3 to 11
set the visible of sprite p to false
end repeat
repeat with p = 40 to 45
puppetSprite p,0
end repeat
updateStage
end
on findStateNumber
put field "stateData" into temp
repeat with y = 1 to the number of lines in temp
if the name of cast (the castNum of sprite 1) = line y of temp then
put y-1 into y
if y = 0 then put 1 into y
return y
end if
end repeat
beep
return 1 -- not possible
end
on findSite
put the name of cast (the castNum of sprite 1) into siteName
delete char 1 of siteName
put integer(siteName) into siteNum
return siteNum
end
on findState
put field "stateData" into temp
repeat with y = 1 to the number of lines in temp
if the name of cast (the castNum of sprite 1) = line y of temp then
return line y of field "SiteBaseAddress"
end if
end repeat
beep
return 1 -- not possible
end
on getStateNumFromSite
put field "stateData" into temp
put getCurrentState() into y
return y
beep
return 1 -- not possible
end
on getCurrentState -- USE THIS ONLY IN USITES!!!
put field "WholeSiteAddress" into temp
put 0 into y
-- òmodified:
put the name of cast (the castNum of sprite 1) into siteName
delete char 1 of siteName
put integer(siteName) into siteNum
-- ò
repeat with y = 1 to the number of lines in temp
put integer(line y of temp) into highestState
if siteNum >= highestState then
-- keep searching
else
put integer(line y-1 of temp) into highestState
return y-1
end if
end repeat
return y-1 -- must be CA
end
on getPadded input
put string(integer(input)) into temp
if length(temp) < 2 then
put "0" before temp
end if
return temp
end
on synchStory
global storyTarget,theButton,theButtonName
if soundBusy(1) then
repeat while soundBusy(1)
if the mouseDown then
-- repeat with s = 14 to 18
-- puppetSprite s,1
-- end repeat
-- puppetTransition 0
-- updateStage
-- -- put mouseCast() into theButton
-- -- put the name of cast theButton into theButtonName
-- --put theButtonName
-- -- u,?,66,exit,turn
-- put 0 into doHilite
-- repeat with s = 14 to 18
-- if rollover(s) then
-- put 1 into doHilite
-- exit repeat
-- end if
-- end repeat
-- if doHilite then
-- if s < 18 then -- it's a normal sign
-- set the castNum of sprite s to the castNum of sprite s+8
-- updateStage
-- repeat while the mouseDown
-- nothing
-- end repeat
-- set the castNum of sprite s to the castNum of sprite s-8
-- updateStage
-- if s = 14 then -- u-turn
-- sound stop 1
-- sound stop 2
-- repeat with s = 14 to 18
-- puppetSprite s,0
-- end repeat
-- puppetTransition 0
-- updateStage
-- if the frame < 45 then
-- go "menu 1"
-- else
-- go "menu 2"
-- end if
--
-- else if s = 15 then -- ?
-- alert "help"
-- else if s = 16 then -- home
-- sound stop 1
-- sound stop 2
-- repeat with s = 14 to 18
-- puppetSprite s,0
-- end repeat
-- puppetTransition 0
-- updateStage
-- -- alert "go to main menu"
-- else if s = 17 then -- quit
-- sound stop 1
-- sound stop 2
-- repeat with s = 14 to 18
-- puppetSprite s,0
-- end repeat
-- puppetTransition 0
-- updateStage
-- quit
-- end if
--
-- else -- it's the turn signals!
-- put the locH of sprite s into midPt
-- if the mouseH < midPt then -- go back
-- set the castNum of sprite s to the castNum of sprite s-1
-- updateStage
-- repeat while the mouseDown
-- nothing
-- end repeat
-- set the castNum of sprite s to the castNum of sprite s+1
-- puppetSprite s,0
-- updateStage
-- if marker(-1) > 29 then
-- go marker(-1)
-- else
-- go "story 12"
-- end if
-- else -- go forth
-- set the castNum of sprite s to the castNum of sprite s+1
-- updateStage
-- repeat while the mouseDown
-- nothing
-- end repeat
-- puppetSprite s,0
-- set the castNum of sprite s to the castNum of sprite s-1
-- updateStage
-- if marker(1) < 67 then
-- go marker(1)
-- else
-- go "story 1"
-- end if
-- end if
-- end if
-- end if
--PATCH:
exit repeat
end if
end repeat
-- What to do when all audio has played for a story:
--òNotice a need for a special case @end
if ((the frame + 1) = marker(1)) OR (the frame = 66) OR (the mouseDown) then
sound stop 1
sound stop 2
-- repeat with s = 14 to 18
-- puppetSprite s,0
-- end repeat
puppetTransition 0
updateStage
if the frame < 45 then
go "menu 1"
else
go "menu 2"
end if
end if
else
-- if the mouseDown then
--
-- repeat with s = 14 to 18
-- puppetSprite s,1
-- end repeat
-- puppetTransition 0
-- updateStage
-- -- put mouseCast() into theButton
-- -- put the name of cast theButton into theButtonName
-- --put theButtonName
-- -- u,?,66,exit,turn
-- put 0 into doHilite
-- repeat with s = 14 to 18
-- if rollover(s) then
-- put 1 into doHilite
-- exit repeat
-- end if
-- end repeat
-- if doHilite then
-- if s < 18 then -- it's a normal sign
-- set the castNum of sprite s to the castNum of sprite s+8
-- updateStage
-- repeat while the mouseDown
-- nothing
-- end repeat
-- set the castNum of sprite s to the castNum of sprite s-8
-- updateStage
-- if s = 14 then -- u-turn
-- sound stop 1
-- sound stop 2
-- repeat with s = 14 to 18
-- puppetSprite s,0
-- end repeat
-- puppetTransition 0
-- updateStage
-- if the frame < 45 then
-- go "menu 1"
-- else
-- go "menu 2"
-- end if
--
-- else if s = 15 then
--
-- else if s = 16 then
--
-- else if s = 17 then
--
-- end if
--
-- else -- it's the turn signals!
-- put the locH of sprite s into midPt
-- if the mouseH < midPt then -- go back
-- set the castNum of sprite s to the castNum of sprite s-1
-- updateStage
-- repeat while the mouseDown
-- nothing
-- end repeat
-- set the castNum of sprite s to the castNum of sprite s+1
-- puppetSprite s,0
-- updateStage
-- if marker(-1) > 29 then
-- go marker(-1)
-- else
-- go "story 12"
-- end if
-- else -- go forth
-- set the castNum of sprite s to the castNum of sprite s+1
-- updateStage
-- repeat while the mouseDown
-- nothing
-- end repeat
-- puppetSprite s,0
-- set the castNum of sprite s to the castNum of sprite s-1
-- updateStage
-- if marker(1) < 67 then
-- go marker(1)
-- else
-- go "story 1"
-- end if
-- end if
-- end if
-- end if
-- end if
if ((the frame + 1) = marker(1)) OR (the frame = 66) OR (the mouseDown) then
sound stop 1
sound stop 2
-- repeat with s = 14 to 18
-- puppetSprite s,0
-- end repeat
puppetTransition 0
updateStage
if the frame < 45 then
go "menu 1"
else
go "menu 2"
end if
end if
end if
end
on gomenu
global storyTarget
-- Handles mouseDown in menu
repeat with s = 3 to 11
if rollOver(s) then
-- set the foreColor of sprite s to 209
set the visible of sprite s to 1
updateStage
-- Put here to ensure a valid click:
-- put the name of cast mouseCast() into cName
repeat while the mouseDown
nothing
end repeat
sound stop 1
sound stop 2
put the name of cast mouseCast() into cName
if char 1 of cName = "s" then
delete char 1 of cName
put integer(cName) into storyTarget
-- put storyTarget
go ("state" && string(storyTarget))
end if
exit repeat
else
-- set the foreColor of sprite s to 29
set the visible of sprite s to 0
end if
end repeat
updateStage
end
on goSite
global storyTarget
-- Handles mouseDown in menu
repeat with s = 3 to 11
if rollOver(s) then
-- set the foreColor of sprite s to 209
set the visible of sprite s to 1
updateStage
-- Put here to ensure a valid click:
-- put the name of cast mouseCast() into cName
repeat while the mouseDown
nothing
end repeat
sound stop 1
sound stop 2
put the name of cast mouseCast() into cName
if char 1 of cName = "s" then
delete char 1 of cName
put integer(cName) into storyTarget
-- put storyTarget
go ("site" && string(storyTarget))
end if
exit repeat
else
-- set the foreColor of sprite s to 29
set the visible of sprite s to 0
end if
end repeat
updateStage
end
on goState
end
on dealWithManics
end
on SetupSigns -- Inits Sign Buttons
-- repeat with p = 40 to 45
-- -- set the visible of sprite s to true -- you never know...
-- puppetSprite p,1
-- end repeat
updatestage
end